import Login from "../pages/Login";
import Home from "../pages/Home";
import NavPage from "../pages/NavPage";
import User from '../pages/system/user/User'
import Role from '../pages/system/role/Role'
import Menu from '../pages/system/Menu'
import Dict from '../pages/system/Dict'
import UserCenter from "../pages/UserCenter";
import { Navigate } from "react-router-dom";

export const routes = [
    {
        path: '/',
        element: <Navigate to='/login'></Navigate>
    },
    {
        path: '/login',
        element: <Login />
    },
    {
        path: '/home',
        element: <NavPage />,
        children: [
            {
                index: true,
                element: <Home />
            }
        ]
    },
    {
        path: '/system',
        element: <NavPage />,
        children: [
            {
                path: 'user',
                element: <User />
            },
            {
                path: 'role',
                element: <Role />
            },
            {
                path: 'menu',
                element: <Menu />
            },
            {
                path: 'dict',
                element: <Dict />
            }
        ]
    },
    {
        path: '/userCenter',
        element: <NavPage />,
        children: [
            {
                index: true,
                element: <UserCenter />
            }
        ]
    }
]